<%@ page isELIgnored="false" %><%--isELIgnored=true禁用EL表达式--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- JSTL标签库是一个JSP标签的集合，封装了许多jsp应用程序通用的核心功能-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/layui-v2.6.13/layui/css/layui.css"/>
    <script src="${pageContext.request.contextPath}/js/jquery.min-2.1.1.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/layui-v2.6.13/layui/layui.js"></script>
    <style>
        .layui-table{
            /*margin-bottom: 20px;*/
            /*margin-left: 30px;*/
        }
        h1{
            /*margin-bottom: 20px;*/
            /*margin-left: 30px;*/
        }
    </style>
</head>
<body>
<h1>订单详情</h1>
<table class="layui-table">
    <!-- colgroup中可以使用col来定义表格单元格宽度， -->
    <colgroup>
        <col width="200">
        <col width="200">
        <col width="100">
        <col width="200">
        <col width="200">
        <col>

    </colgroup>
    <thead>
    <tr>
        <th>订单号</th>
        <th>用户ID</th>
        <th>用户名</th>
        <th>交易金额</th>
        <th>交易时间</th>
        <th>订单状态</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${order}" var="order">
        <tr>
            <td>${order.orderNo}</td>
            <td>${order.uId}</td>
            <td>${order.uName}</td>
            <td>${order.orderMoney}</td>
            <td><f:formatDate value="${order.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td>
                <c:if test="${order.orderStatus == 1}">待付款</c:if>
                <c:if test="${order.orderStatus == 2}">待发货</c:if>
                <c:if test="${order.orderStatus == 3}">已发货</c:if>
                <c:if test="${order.orderStatus == 4}">已签收</c:if>
                <c:if test="${order.orderStatus == 5}">退款中</c:if>
                <c:if test="${order.orderStatus == 6}">已退款</c:if>
                <c:if test="${order.orderStatus == 7}">交易结束</c:if>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<h1>商品列表</h1>
<table class="layui-table">
    <!-- colgroup中可以使用col来定义表格单元格宽度， -->
    <colgroup>
        <col width="100">
        <col width="200">
        <col width="100">
        <col width="200">
        <col width="200">
        <col width="200">
        <col>

    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>订单号</th>
        <th>商品ID</th>
        <th>商品名</th>
        <th>单价</th>
        <th>购买数量</th>
        <th>金额</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${list}" var="orderGoods">
        <tr>
            <td>${orderGoods.id}</td>
            <td>${orderGoods.orderNo}</td>
            <td>${orderGoods.gId}</td>
            <td>${orderGoods.gName}</td>
            <td>${orderGoods.gPrice}</td>
            <td>${orderGoods.buyCount}</td>
            <td>${orderGoods.totalMoney}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>